package com.tencent.iov.cowin.befsale.clue.service.cus;

import com.tencent.iov.cowin.befsale.clue.controller.cus.vo.request.AddCustomerFollowPlanRequest;
import com.tencent.iov.cowin.befsale.clue.controller.cus.vo.request.QueryCustomerFollowPlanRequest;
import com.tencent.iov.cowin.befsale.clue.controller.cus.vo.request.UpdateClueEmpRequest;
import com.tencent.iov.cowin.befsale.clue.controller.cus.vo.request.UpdateCustomerFollowPlanRequest;
import com.tencent.iov.cowin.befsale.clue.controller.cus.vo.response.CustomerFollowPlanResponse;
import com.tencent.iov.cowin.befsale.clue.domain.clue.po.Clue;

import java.util.List;

/**
 * @Describe: 跟进线索表_Service接口层
 * @author: xiamu
 * @created: 2021-12-21 17:29:54
 * @version: 1.0
 */
public interface CustomerFollowPlanService {

    /**
     * 通过ID获取详细信息
     *
     * @param id 主键ID
     * @return CustomerFollowPlanResponse对象
     */
    CustomerFollowPlanResponse getDetailById(Long id);

    /**
     * 单条数据插入
     *
     * @param request 插入参数
     * @return 插入的条数
     */
    Long insert(AddCustomerFollowPlanRequest request);

    /**
     * 批量插入
     *
     * @param requests 批量插入参数
     * @return 批量插入的条数
     */
    int insertBatch(List<AddCustomerFollowPlanRequest> requests);

    /**
     * 更新
     *
     * @param request 更新参数
     * @return 更新的条数
     */
    int update(UpdateCustomerFollowPlanRequest request);

    /**
     * 根据条件查询单个对象
     *
     * @param request 查询参数
     * @return 查询结果
     */
    CustomerFollowPlanResponse getOneByParam(QueryCustomerFollowPlanRequest request);

    /**
     * 根据战败线索保存或者更新线索跟进计划
     * @param clue 线索
     * @param request 参数
     * @return 跟进计划主键ID
     */
    CustomerFollowPlanResponse insertOrUpdateByFailClue(Clue clue, UpdateClueEmpRequest request);
}